#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>

int main() {
	int a; scanf("%d", &a);
	do printf("%d", a % 10), a /= 10;
		while (a);
	return 0;
}

